<template>
  <div style="min-height: 300px">
    <a-table :bordered="{cell:true}" :pagination="false" stripe :data="entity.orderList">
      <template #columns>
        <a-table-column title="行号" data-index="lineno" width="70"></a-table-column>
        <a-table-column title="钢种" data-index="pinming" width="80"></a-table-column>
        <a-table-column title="订单数量(T)" data-index="count"></a-table-column>
        <a-table-column title="产品标识号" data-index="cpm"></a-table-column>
        <a-table-column title="来料规格(T)" data-index="llgg"></a-table-column>
        <a-table-column title="锻造规格" data-index="guige"></a-table-column>
        <a-table-column title="#" width="200">
          <template #cell="{ record }">
            <a-button type="primary" size="small" @click="setGongYi(record.id)"><template #icon><icon-share-alt /></template>设置工艺路线</a-button>
          </template>
        </a-table-column>
      </template>
    </a-table>
    <a-modal title="工艺设置" v-model:visible="state.setyGongYiVisible" :footer="false" width="1280px">
      <ProductGYSet v-if="state.setyGongYiVisible" v-model="state.setyGongYiVisible" :entityId="state.popupEntityId"></ProductGYSet>
    </a-modal>
  </div>
</template>

<script lang="ts" setup>
import { reactive, ref, onMounted, defineProps, defineEmits, nextTick, defineAsyncComponent } from "vue";
const ProductGYSet = defineAsyncComponent(() => import('@/views/product/tasktz/productGYSet.vue'));

const emit = defineEmits(['update:modelValue'])
let props = defineProps({
  modelValue : {type : Boolean, default: true},
  entityId : {type : Number, default: 0}
})
let entity = reactive({
  orderList : [
    {lineno:10, hth:'2022-2L-29',pinming:'H13',guige:'@220(0,+3)', count:'27.45T', cpm:'H13-A1', llgg:'31.5T'},
    {lineno:20, hth:'2022-2L-29',pinming:'H13',guige:'@250(0,+3)', count:'15.45T', cpm:'H13-A1', llgg:'18.5T'},
    {lineno:30, hth:'2022-2L-29',pinming:'H15',guige:'@320(0,+5)', count:'27.45T', cpm:'H15-A1', llgg:'31.8T'}
  ]
})
const state = reactive({
  setyGongYiVisible:false,
})
const rules = reactive({

})
const setGongYi = (id)=>{
  state.setyGongYiVisible = true
}
onMounted(()=>{
  nextTick(()=>{
  })
})
</script>

<style scoped>

</style>
